cmake_minimum_required(VERSION 2.8.3)
project(qbot_webserver)

set(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc")
find_package(
  Boost REQUIRED COMPONENTS
  thread
  system
)

add_compile_options(-std=c++11)

set(Boost_USE_STATIC_LIBS ON)

## 配置include搜索路径
## C:\opt\ros\melodic\x64\include

include_directories(
  ${Boost_INCLUDE_DIRS}
  include dll/
  include src/
)

add_executable(${PROJECT_NAME}
  src/webserver.cpp
  src/json/json_reader.cpp
  src/json/json_value.cpp
  src/json/json_writer.cpp
  src/qbot/qbot_parser.cpp
  src/qbot/qbot_master.cpp
  src/qbot/serialport.cpp
)

## 配置链接库

target_link_libraries(
  ${PROJECT_NAME}
  ${Boost_LIBRARIES}
  pthread
)

